libmymath.so: sub.o add.o
	gcc -shared -o libmymath.so sub.o add.o
add.o:add.c
	gcc -c -fPIC -o add.o add.c
sub.o:sub.c
	gcc -c -fPIC -o sub.o sub.c
.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp -rf *.h mylib/include
	cp -rf *.so mylib/lib
	tar -czf mylib.tgz mylib
.PHONY:clean
clean:
	rm -rf libmymath.so sub.o add.o mylib
